/**********************************************************************
* Filename: Golo.java
* Created: 2012/04/23
* @author Fernando Brito e Abreu
**********************************************************************/
package org.quasar.copaPaises.businessLayer;

import java.util.Set;
import java.util.HashSet;

public class Golo
{
	public static Set<Golo> allInstances = new HashSet<Golo>();
	
	private int minuto;
	private Membro marcador;
	
	/**********************************************************************
	* Default constructor
	**********************************************************************/
	public Golo()
	{
		allInstances.add(this);
	}
	
	/**********************************************************************
	* Parameterized constructor
	* @param minuto the minuto to initialize
	* @param marcador the marcador to initialize
	**********************************************************************/
	public Golo(int minuto, Membro marcador)
	{
		this.minuto = minuto;
		this.marcador = marcador;
		allInstances.add(this);
	}
	
	/**********************************************************************
	* Standard attribute getter
	* @return the minuto of the golo
	**********************************************************************/
	public int minuto()
	{
		return minuto;
	}
	
	/**********************************************************************
	* Standard attribute setter
	* @param minuto the minuto to set
	**********************************************************************/
	public void setMinuto(int minuto)
	{
		this.minuto = minuto;
	}
	
	/**********************************************************************
	* ONE2MANY getter for Golo[*] <-> Membro[1]
	* @return the marcador of the golo
	**********************************************************************/
	public Membro marcador()
	{
		return marcador;
	}
	
	/**********************************************************************
	* ONE2MANY setter for Golo[*] <-> Membro[1]
	* @param marcador the marcador to set
	**********************************************************************/
	public void setMarcador(Membro marcador)
	{
		this.marcador = marcador;
	}
	
	/* (non-Javadoc)
	* @see java.lang.Object#toString()
	*/
	@Override
	/**********************************************************************
	* Object serializer
	**********************************************************************/
	public String toString()
	{
		return "Golo [minuto=" + minuto + ", marcador=" + marcador + "]\n";
	}
	
}
